#include<iostream>
using namespace std;

class exam {
	int x;
public:
	exam(int n)
	{
		x = n;
		cout <<"construct called" <<endl ;
	}
	int get_x()
	{
		return x;
	}
	~exam()
	{
		cout << "destruct called" << endl;
	}
};

int main()
{
	exam ob[4] = {11, 22, 33, 44};
	/*for (int i = 0; i < 4; i++)
	{
		cout << ob[i].get_x() << endl;
	}*/

	exam* pob = ob;
	for (int i = 0; i < 4; i++)
	{
		cout << (pob+i)->get_x() << endl;
	}
	return 0;
}

